<template>
  <div>

  <el-upload
    class="upload-demo"
    drag
    action="http://127.0.0.1:8081/upload"
    :on-success="handleAvatarSuccess"
    name="img"
    multiple>
    <i class="el-icon-upload"></i>
    <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
    <div class="el-upload__tip" slot="tip">只能上传jpg/png文件，且不超过500kb</div>
  </el-upload>
    <p>imgUrl : {{imgUrl}}</p>
  </div>
</template>

<script>
    export default {
      name: "upload",
      data() {

        return {
          imgUrl: '',
        }
      },
      methods: {
        toM12Img: function () {

        },
        handleAvatarSuccess: function (response) {
            console.log("++++++",response.ImgUrl)
            this.imgUrl = response.ImgUrl;
            console.log("=====",response.status)
          }

        }
      }

</script>

<style scoped>

</style>
